package com.woniu.commentorder.service.serviceImp;

import com.hc.entity.Order;
import com.woniu.commentorder.mapper.OrderMapper;
import com.woniu.commentorder.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class OrderServiceImp implements OrderService {
    @Autowired
    private OrderMapper orderMapper;

    @Override
    public Order selectByOrderCode(Order order) {
        Order order1 = orderMapper.selectByOrderCode(order);
        return order1;
    }

    @Override
    public boolean changeByOrderCode(Order order) {
        Order order1 = orderMapper.selectByOrderCode(order);
        if(order1 != null){
            orderMapper.changeByOrderCode(order);
            return true;
        }
        return false;
    }
}
